<?php

require_once ("config.inc.php");
require_once (COMM_PATH . "book.php");
require_once(COMM_PATH . "bookUtil.php");
$book = new Book ();

if ($_SERVER['REQUEST_METHOD']=='POST'){
	$data['username'] = $_POST['author'];
	$data['email'] = $_POST['email'];
	$data['contents'] = $_POST['comment'];
	$NOW_DATE = getFormatDate_underline();
	$data['createTime'] = $NOW_DATE;
	if($book->insertData($book->_LWORD, $data)){
		$sbflag = 3;
	}else{
		$sbflag = 2;
	}
	
}
if ($sbflag==3){
	echo json_encode("提交成功！");
}else{
	echo  json_encode("提交失败！");
}

?>
